package com.ruoyi.novel.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.novel.mapper.IndexCarouselMapper;
import com.ruoyi.novel.domain.IndexCarousel;
import com.ruoyi.novel.service.IIndexCarouselService;

/**
 * 首页轮播Service业务层处理
 * 
 * @author sjy
 * @date 2025-06-01
 */
@Service
public class IndexCarouselServiceImpl implements IIndexCarouselService 
{
    @Autowired
    private IndexCarouselMapper indexCarouselMapper;

    /**
     * 查询首页轮播
     * 
     * @param id 首页轮播主键
     * @return 首页轮播
     */
    @Override
    public IndexCarousel selectIndexCarouselById(Long id)
    {
        return indexCarouselMapper.selectIndexCarouselById(id);
    }

    /**
     * 查询首页轮播列表
     * 
     * @param indexCarousel 首页轮播
     * @return 首页轮播
     */
    @Override
    public List<IndexCarousel> selectIndexCarouselList(IndexCarousel indexCarousel)
    {
        return indexCarouselMapper.selectIndexCarouselList(indexCarousel);
    }

    /**
     * 新增首页轮播
     * 
     * @param indexCarousel 首页轮播
     * @return 结果
     */
    @Override
    public int insertIndexCarousel(IndexCarousel indexCarousel)
    {
        return indexCarouselMapper.insertIndexCarousel(indexCarousel);
    }

    /**
     * 修改首页轮播
     * 
     * @param indexCarousel 首页轮播
     * @return 结果
     */
    @Override
    public int updateIndexCarousel(IndexCarousel indexCarousel)
    {
        return indexCarouselMapper.updateIndexCarousel(indexCarousel);
    }

    /**
     * 批量删除首页轮播
     * 
     * @param ids 需要删除的首页轮播主键
     * @return 结果
     */
    @Override
    public int deleteIndexCarouselByIds(Long[] ids)
    {
        return indexCarouselMapper.deleteIndexCarouselByIds(ids);
    }

    /**
     * 删除首页轮播信息
     * 
     * @param id 首页轮播主键
     * @return 结果
     */
    @Override
    public int deleteIndexCarouselById(Long id)
    {
        return indexCarouselMapper.deleteIndexCarouselById(id);
    }
}
